// 实现类接口
class Implementor {
    operationImpl () {
        console.log('执行操作')
    }
}

// 抽象类
class Abstraction {
    constructor(implementor) {
        this.implementor = implementor
    }

    operation () {
        this.implementor.operationImpl()
    }
}

// 扩展抽象类
class RefinedAbstraction extends Abstraction {
    otherOperation () {
        console.log('执行其他操作')
    }
}

// 使用桥接模式
const implementor = new Implementor()
const abstraction = new Abstraction(implementor)
abstraction.operation()

const refinedAbstraction = new RefinedAbstraction(implementor)
refinedAbstraction.operation()
refinedAbstraction.otherOperation()